const express = require('express');
const router = express.Router();
const user_handler = require("../../router_handler/user/User");
const {verifyToken} = require("../../utils/JWT");

// 新增或更新用户
router.post('/', verifyToken, user_handler.addOrUpdateUser);
// 查询所有用户
router.get('/', verifyToken, user_handler.getUserList);
// 根据ID查询用户
router.get('/:id', verifyToken, user_handler.getUserById);
// 批量删除用户
router.delete('/', verifyToken, user_handler.deleteUserByIds);
//获取IP地址
router.get('/ip', user_handler.getIP);
module.exports = router;